import userApi from '@/config/server/api/user'

function downloadTemplate(data) {
  let info = {
    fileName : '人员添加模版.xls',
    o1: data.o1 ?? '无',
    o2: data.o2 ?? '无',
    o3: data.o3 ?? '无'
  }
  return userApi.out.downloadTemplate.fetch(info)
}

function importTemplate(data) {
  let info = {
    o1: data.o1Id,
    o2: data.o2Id,
    o3: data.o3Id,
    fileName : 'file'
  }
  let upload = userApi.out.importTemplate
  upload.setData(info)
  return upload
}

function adjustPerson(info) {
  return userApi.out.adjustPerson.fetch(info)
}

function adjustRecord(info) {
  return userApi.out.adjustRecord.fetch(info)
}

function exportRecord(info) {
  return userApi.out.exportRecord.fetch(info)
}

export default {
  downloadTemplate,
  importTemplate,
  adjustPerson,
  adjustRecord,
  exportRecord
}